package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Repository;

import com.financing.wap.dto.DstMemberSendLogDTO;
import com.financing.wap.dao.IDstMemberSendLogDao;
import com.financing.wap.common.SqlName;
/**
 * dst_member_send_log  
 * 会员开通记录 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("dstMemberSendLogDao")
public class DstMemberSendLogDaoImpl extends BaseDaoImpl<DstMemberSendLogDTO, java.lang.Integer> implements IDstMemberSendLogDao {


	@Override
	public int insert(DstMemberSendLogDTO dstMemberSendLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.DstMemberSendLogSql.insert, dstMemberSendLog);
	}

	@Override
	public void update(DstMemberSendLogDTO dstMemberSendLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstMemberSendLogSql.update, dstMemberSendLog);
	}

	@Override
	public void updateForce(DstMemberSendLogDTO dstMemberSendLog) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.DstMemberSendLogSql.updateForce, dstMemberSendLog);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.DstMemberSendLogSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<DstMemberSendLogDTO> queryList(DstMemberSendLogDTO dstMemberSendLog) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.DstMemberSendLogSql.queryList, dstMemberSendLog);
	}

	@Override
	public int queryListCount(DstMemberSendLogDTO dstMemberSendLog) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.DstMemberSendLogSql.queryListCount, dstMemberSendLog);
	}

	@Override
	public DstMemberSendLogDTO loadById(Integer id) throws SQLException {
		return  (DstMemberSendLogDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.DstMemberSendLogSql.loadById,id);
	}

	@Override
	public Class<DstMemberSendLogDTO> getEntityClass() {
		return DstMemberSendLogDTO.class;
	}
 	
}
